//
//  PointRecordCtrl.m
//  spotrs
//
//  Created by sky on 16/5/17.
//  Copyright © 2016年 TZ. All rights reserved.
//

#import "PointRecordCtrl.h"

@interface PointRecordCtrl (){
    UILabel *_point;
}

@end

@implementation PointRecordCtrl

- (void)viewDidLoad {
    [super viewDidLoad];
    [self buildLayout];
    // Do any additional setup after loading the view.
}

-(void)buildLayout{
    self.titleText = @"我的积分";
    self.view.backgroundColor = [LCCommon getColor:@"f6f7f8"];
    [self creatTopNavagaiong];
    [self liftGoBackImage];
    

    UIView *firstbgvi = [[UIView alloc]initWithFrame:CGRectMake(0, 64, SCREEN_WIDTH, 45)];
    firstbgvi.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:firstbgvi];
    UILabel *pointrec = [self LabelWithRect:CGRectMake(15, 45/2 - 15/2, 15 * 4 + 10, 15) textColor:[LCCommon getColor:@"000000"] textstr:@"现有积分:" textfont:15 textstyle:NSTextAlignmentLeft];
    [firstbgvi addSubview:pointrec];
    [self makeLinewithRect:CGRectMake(0, 44.5, SCREEN_WIDTH, .5) Color:[LCCommon getColor:@"999999"] addview:firstbgvi];
    UIImage *xx = [[UIImage alloc]init];
    UIImageView *jiantou = [[UIImageView alloc]initWithFrame:CGRectMake(SCREEN_WIDTH - 15 - 15, 45/2 - 15/2, 15, 15)];
    jiantou.backgroundColor = [LCCommon getColor:@"787878"];
    [firstbgvi addSubview:jiantou];
    
    _point = [self LabelWithRect:CGRectMake(pointrec.frame.origin.x + pointrec.frame.size.width, pointrec.frame.origin.y, SCREEN_WIDTH / 2, 15) textColor:[LCCommon getColor:@"d3d3d3"] textstr:@"0" textfont:15 textstyle:NSTextAlignmentLeft];
    [firstbgvi addSubview:_point];
    
    
    UIView *secbgvi = [[UIView alloc]initWithFrame:CGRectMake(0, 64 + 45, SCREEN_WIDTH, 45)];
    secbgvi.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:secbgvi];
    UILabel *pointshuoming = [self LabelWithRect:CGRectMake(15, 45/2 - 15/2, 100, 15) textColor:[LCCommon getColor:@"000000"] textstr:@"积分记录" textfont:15 textstyle:NSTextAlignmentLeft];
    [secbgvi addSubview:pointshuoming];
    [self makeLinewithRect:CGRectMake(0, 44.5, SCREEN_WIDTH, .5) Color:[LCCommon getColor:@"999999"] addview:secbgvi];
    UIImage *xxx = [[UIImage alloc]init];
    UIImageView *jiantou1 = [[UIImageView alloc]initWithFrame:CGRectMake(SCREEN_WIDTH - 15 - 15, 45/2 - 15/2, 15, 15)];
    jiantou1.backgroundColor = [LCCommon getColor:@"787878"];
    [secbgvi addSubview:jiantou1];

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(void)makeLinewithRect:(CGRect)rect Color:(UIColor *)color addview:(UIView *)vi{
    UIView *line = [[UIView alloc]initWithFrame:rect];
    line.backgroundColor = color;
    [vi addSubview:line];
}

-(UILabel *)LabelWithRect:(CGRect)rect textColor:(UIColor *)color textstr:(NSString *)str textfont:(int)font textstyle:(NSTextAlignment)aligment{
    UILabel *label = [[UILabel alloc] initWithFrame:rect];
    label.textColor = color;
    label.text = str;
    label.font = [UIFont systemFontOfSize:font];
    label.textAlignment = aligment;
    label.numberOfLines = 0;
    return label;
}



/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
